<template>
  <div>
    <van-nav-bar title="设置" @click-left="onClickLeft" left-arrow style="margin-bottom: 6px"/>
    <van-cell title="基本设置" class="vc"/>
    <van-cell center title="水印图片" label="在上传的图片中添加水印">
      <template #right-icon>
        <van-switch v-model="checked1" active-color="#00bfff" inactive-color="#dcdee0" size="24px"/>
      </template>
    </van-cell>
    <van-cell center title="省流量模式" label="仅在WLAN模式下会自动加载">
      <template #right-icon>
        <van-switch v-model="checked2" active-color="#00bfff" inactive-color="#dcdee0" size="24px"/>
      </template>
    </van-cell>
    <van-cell center title="双击赞同">
      <template #right-icon>
        <van-switch v-model="checked3" active-color="#00bfff" inactive-color="#dcdee0" size="24px"/>
      </template>
    </van-cell>
    <van-cell center title="截屏后分享">
      <template #right-icon>
        <van-switch v-model="checked4" active-color="#00bfff" inactive-color="#dcdee0" size="24px"/>
      </template>
    </van-cell>
    <van-cell center title="自动下载更新" label="仅在WLAN下自动下载">
      <template #right-icon>
        <van-switch v-model="checked5" active-color="#00bfff" inactive-color="#dcdee0" size="24px"/>
      </template>
    </van-cell>
    <van-cell title="字体大小" is-link @click="setFont"/>
    <van-cell center title="视频自动播放">
      <template #right-icon>
        <van-switch v-model="checked6" active-color="#00bfff" inactive-color="#dcdee0" size="24px"/>
      </template>
    </van-cell>

    <van-cell title="通知设置" class="vc"/>
    <van-cell title="全局消息设置" is-link @click="message"/>
    <van-cell title="全局推送通知设置" is-link @click="notice"/>

    <van-cell title="账号设置" class="vc"/>
    <van-cell center title="账号与安全" label="管理账号安全,修改密码等" is-link @click="account"/>

    <van-cell title="隐私设置" class="vc"/>
    <van-cell title="隐私" @click="privacy"/>
    <van-cell title="已收集个人信息清单" @click="personalInformation"/>

    <van-cell title="关于与帮助" class="vc"/>
    <van-cell title="用户体验调研" @click=""/>
    <van-cell title="检查更新" label="当前版本Beta1.0" @click=""/>
    <van-cell title="关于时光源" @click=""/>

    <div style="margin: 16px 16px 16px 90px">
      <van-button round block color="#00bfff" class="vb" @click="logout">退出登录</van-button>
    </div>
  </div>
</template>

<script>
import {Toast} from "vant";

export default {
  name: "Settings",
  data() {
    return {
      checked1: true,
      checked2: false,
      checked3: false,
      checked4: true,
      checked5: false,
      checked6: false,
    };
  },
  methods: {
    onClickLeft() {
      Toast('返回');
      history.go(-1)
    },
    setFont(){
      Toast('设置字体大小')
    },
    message(){
      Toast('全局消息设置')
    },
    notice(){
      Toast('全局推送通知设置')
    },
    account(){
      Toast('账号与安全')
    },
    privacy(){
      Toast('隐私')
    },
    personalInformation(){
      Toast('个人信息清单')
    },
    logout(){
      Toast('已退出')
    }
  }
}
</script>

<style scoped>
.vc{
  padding-top: 2px;
  padding-bottom: 2px;
  background: rgba(211, 211, 211, 0.71);
}
.vb{
  width: 200px;
}
</style>